package mc437g2;

import java.math.BigInteger;
import java.rmi.RemoteException;

import javax.xml.rpc.holders.BigIntegerHolder;
import javax.xml.rpc.holders.StringHolder;

import mc437g2_pkg.Mc437G2Locator;
import mc437g2_pkg.Mc437G2PortType;

public class Mc437G2PortTypeProxy implements Mc437G2PortType {
  private String _endpoint = null;
  private Mc437G2PortType mc437G2PortType = null;
  
  public Mc437G2PortTypeProxy() {
    _initMc437G2PortTypeProxy();
  }
  
  public Mc437G2PortTypeProxy(String endpoint) {
    _endpoint = endpoint;
    _initMc437G2PortTypeProxy();
  }
  
  private void _initMc437G2PortTypeProxy() {
    try {
      mc437G2PortType = (new Mc437G2Locator()).getmc437g2Port();
      if (mc437G2PortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)mc437G2PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)mc437G2PortType)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (mc437G2PortType != null)
      ((javax.xml.rpc.Stub)mc437G2PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public Mc437G2PortType getMc437G2PortType() {
    if (mc437G2PortType == null)
      _initMc437G2PortTypeProxy();
    return mc437G2PortType;
  }

@Override
public BigInteger g02_teste(BigInteger n1, BigInteger n2)
		throws RemoteException {
	 if (mc437G2PortType == null)
	      _initMc437G2PortTypeProxy();
	 return mc437G2PortType.g02_teste(n1, n2);
}

@Override
public void g02_busca_por_endereco(String uf, String cidade, String bairro,
		String tipo, String logradouro, BigInteger numero,
		BigIntegerHolder erro, StringHolder cep_list) throws RemoteException {
	 if (mc437G2PortType == null)
	      _initMc437G2PortTypeProxy();
	 mc437G2PortType.g02_busca_por_endereco(uf, cidade, bairro, tipo, logradouro, numero, erro, cep_list);
	
}

@Override
public void g02_busca_por_cep(String cep, BigIntegerHolder erro,
		StringHolder uf, StringHolder cidade, StringHolder bairro,
		StringHolder tipo, StringHolder logradouro,
		BigIntegerHolder inicio_trecho, BigIntegerHolder fim_trecho)
		throws RemoteException {
	 if (mc437G2PortType == null)
	      _initMc437G2PortTypeProxy();
	
	 mc437G2PortType.g02_busca_por_cep(cep, erro, uf, cidade, bairro, tipo, logradouro, inicio_trecho, fim_trecho);
	
}
  
  
}